package git.soulbgm.openoffice;

import git.soulbgm.openoffice.utils.OfficeToPdf;

/**
 * @author SoulBGM
 * @version 1.0
 * @date 2020/5/20 0:25
 */
public class OpenOfficeTest {

    public static void main(String[] args) {
        String workPath = System.getProperty("user.dir");
        String wordPath = workPath + "/office/1.docx";
        String pptPath = workPath + "/office/2.pptx";
        String excelPath = workPath + "/office/3.xlsx";

        System.out.println(OfficeToPdf.office2pdf(wordPath, wordPath.replaceAll(".docx", ".pdf")));
        System.out.println(OfficeToPdf.office2pdf(pptPath, pptPath.replaceAll(".pptx", ".pdf")));
        System.out.println(OfficeToPdf.office2pdf(excelPath, excelPath.replaceAll(".xlsx", ".pdf")));
    }

}
